In a storage device and a computer, a hard disk drive (HDD) is generally used as a physical storage medium. In recent years, however, a physical storage medium (e.g., a solid-state drive (SSD)) having a flash memory (FM) is widely used as a new physical storage medium that supersedes the HDD. The SSD mainly includes one or more than one FM chip and a controller for controlling the FM chip, and is advantageous in that it performs an I/O process far more rapidly than the HDD. However, in order to achieve such rapidity, it is necessary to use a control technology appropriate for FM characteristics.
The FM (typically a NAND-type FM) erases data in a unit called “block” (block erasure), and reads and writes data in a unit called “page.” A block is a set of a predetermined number of pages. The time required for block erasure is one order of magnitude longer than required for block read and write operations. The terms “block(s)” and “page(s)” hereinafter denote the block(s) and page(s) of the FM unless otherwise stated.
Because of FM characteristics, a page storing data cannot be overwritten with new data. Therefore, in order to rewrite the data on the page, it is necessary to erase a relevant block and then write new data. Accordingly, before erasing a block, it is necessary to copy valid data in the block to another block. Thus, a longer period of time is required for rewriting data than writing into an unused area available upon block erasure. Consequently, it is necessary to reduce the time required for a data rewrite or prevent a higher-level device from recognizing an increase in response time.
In order to reduce the above-mentioned time required for a data rewrite, a method of additionally writing data to an unused area is employed for rewriting data into the FM. Thus, the SSD includes a logical address space to be provided to a higher-level device and a physical address space corresponding to each FM page. The logical address space and the physical address space are mapped by using individual address correspondence information (logical-physical management information). A process of referencing the logical-physical management information and acquiring a corresponding physical address from a logical address is referred to as logical address-physical address conversion (logical-to-physical conversion). This process is implemented by a controller incorporated in the SSD.
Read and write operations to the FM in the SSD will now be described briefly. In a read operation, in order to identify the physical address where requested data is stored, the SSD references logical address-physical address management information (logical-physical management information) and performs logical-to-physical conversion. Subsequently, based on the physical address derived from logical-to-physical conversion, the SSD acquires the requested data from the FM. In a write operation, the SSD writes write data into an unused area available upon FM block erasure. Subsequently, in the logical-physical management information, the SSD updates a physical address associated with a requested logical address to a physical address of newly written data (performs a logical-physical update). If, in this instance, an unoccupied block, that is, a block erased and writable, is not available, a process of acquiring an unoccupied block needs to be performed because the SSD cannot perform a write.
A process called “reclamation (or garbage collection)” (hereinafter abbreviated to RCM) is performed to acquire an unoccupied block. In a reclamation process, a completely invalid block, that is, an erasable block filled with invalid data, is prepared by moving only valid data from a written block to another block (rewriting). It should be noted that an unoccupied block is necessary for the reclamation process. Therefore, if no unoccupied block is available, the SSD cannot continue with an I/O operation. Such deadlock in FM resource allocation is called the “depletion of unoccupied blocks.”
Consequently, the SSD makes it possible to perform a continuous I/O operation by considering the number of unoccupied blocks necessary for RCM and adjusting the amount of data to be moved by RCM (hereinafter referred to as the RCM amount) as needed to maintain the required number of unoccupied blocks. Further, the logical-physical management information needs to be accessed when a read or write operation to the FM in the SSD or an RCM operation is to be performed. Therefore, the SSD caches the whole logical-physical management information, which is stored in the FM, in a main memory, such as a high-speed dynamic random-access memory (DRAM), in order to reduce the processing overhead involved in accessing the logical-physical management information.
Due to the above-described technology, the SSD is superior to the HDD in performance. However, the SSD is more expensive than the HDD in terms of the price per unit capacity (bit cost). Therefore, a known technology described, for example, in Patent Document 1 reduces the bit cost by using a data compression or other data reduction function.